package com.ruoyi.system.domain.equipment;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.domain.base.BaseShop;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 设备类型对象 equipment_type
 *
 * @author ruoyi
 * @date 2023-02-27
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("equipment_type")
public class EquipmentType implements Serializable {

private static final long serialVersionUID=1L;


        /** 设备类型主键id */
        @TableId(value = "type_id")
    private Long typeId;

        /** 类型名称 */
        @Excel(name = "类型名称")
        @ApiModelProperty(value = "类型名称")
    private String typeName;

        /** 类型编码 */
        @Excel(name = "类型编码")
        @ApiModelProperty(value = "类型编码")
    private String typeCode;

        /** 父类型id */
        //不忽略null字段注解
//        @TableField(updateStrategy = FieldStrategy.IGNORED)
        private Long parentId;

        /** 祖级列表 */
        private String ancestors;

    /** 设备类型状态（0正常 1停用） */
    @Excel(name = "设备类型状态" , readConverterExp = "0=正常,1=停用")
    @ApiModelProperty(value = "设备类型状态 0=正常,1=停用")
    private String status;

        /** 备注 */
        @Excel(name = "备注")
        @ApiModelProperty(value = "备注")
    private String remarks;

    //忽略映射
    @TableField(exist = false)
    private List<EquipmentType> children = new ArrayList<EquipmentType>();


        /** 创建者 */
        private String createBy;

        /** 创建时间 */
        private Date createTime;

        /** 更新者 */
        private String updateBy;

        /** 更新时间 */
        private Date updateTime;
}
